Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

Changes between Version 5 and Version 6 of Development FAQ


Ignore:
Timestamp:
Apr 27, 2007, 8:39:48 PM (17 years ago)
Author:
John Bailey
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Development FAQ

    v5 v6  
    4141Without this, on Windows systems the opened files will use Windows default translation (<CR><LF> for newline, for example).  This will cause errors due to newline format and the "bytes read" counts, which will be wrong when comparing the return value of `read()` to `stat()`.
    4242
    43 === Why are there `G_DIR_SEPARATOR_S` and `G_DIR_SEPARATOR` usages everywhere? ===
     43=== Why is `G_DIR_SEPARATOR_S` and `G_DIR_SEPARATOR` used everywhere? ===
    4444This is a matter of maintaining cross-platform compatibility.  Windows uses a backslash ("\") for directory separators in paths, while UNIX-like systems use the forward slash ("/").  Other OSes may choose to use other separators--for example, prior to Mac OS X, it was common for the directory separator on Macs to be a colon (":").  It is impractical to use preprocessor directives throughout the code to determine the path style to use, especially if a new OS were to appear and use a different directory separator.  GLib, which we already use, provides the convenient separator macro, so we use this to reduce our code complexity and maintain cross-platform portability.
    4545
     
    5050=== Should I use `snprintf()` or `vsnprintf()`? ===
    5151No.  Use the GLib wrapper functions instead.  They are `g_snprintf()` and `g_vsnprintf`.
     52
     53=== How do I get the settings directory? ===
     54Use `purple_home_dir()`.  You should ''not'' use `g_get_home_dir()` or `getenv("HOME")`.
    5255
    5356== Headers ==
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!